Código fuente de 'Formatea fechas y horas.asp'

<html>
<head>
<title>Formatea fechas y horas - Códigos asp, programacion asp, descargas asp, rutinas asp</title>
</head>
<p align="center"><b>
<font size="3">Formatea fechas y horas</font></b>
<body style="font-family: Arial; font-size: 9pt">

<br><br>Ejemplos de formateo de fechas y horas<br>

<%'Código ASP

response.write "<hr>"
for counter=0 to 4
currentdate=now()
response.write "Hoy es..." & "<br>"
response.write currentdate & "<P>"
select case counter
case 0
whichformat="vbgeneraldate"
case 1
whichformat="vblongdate"
case 2
whichformat="vbshortdate"
case 3
whichformat="vblongtime"
case 4
whichformat="vbshorttime"
end select
response.write "FormatDate(now()," & whichformat & ")="
response.write Formatdatetime(currentdate,counter) & "<P><HR>"
next%>
</body></html>